package com.ruoyi.record.service.impl;

import java.util.List;

import com.ruoyi.record.domain.RecordData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.record.mapper.ServiceRecordMapper;
import com.ruoyi.record.domain.ServiceRecord;
import com.ruoyi.record.service.IServiceRecordService;

/**
 * 跟进记录Service业务层处理
 * 
 * @author dj
 * @date 2025-06-27
 */
@Service
public class ServiceRecordServiceImpl implements IServiceRecordService 
{
    @Autowired
    private ServiceRecordMapper serviceRecordMapper;

    /**
     * 查询跟进记录
     * 
     * @param recordid 跟进记录主键
     * @return 跟进记录
     */
    @Override
    public ServiceRecord selectServiceRecordByRecordid(Long recordid)
    {
        return serviceRecordMapper.selectServiceRecordByRecordid(recordid);
    }

    /**
     * 查询跟进记录列表
     * 
     * @param serviceRecord 跟进记录
     * @return 跟进记录
     */
    @Override
    public List<ServiceRecord> selectServiceRecordList(ServiceRecord serviceRecord)
    {
        return serviceRecordMapper.selectServiceRecordList(serviceRecord);
    }

    /**
     * 新增跟进记录
     * 
     * @param serviceRecord 跟进记录
     * @return 结果
     */
    @Override
    public int insertServiceRecord(ServiceRecord serviceRecord)
    {
        return serviceRecordMapper.insertServiceRecord(serviceRecord);
    }

    /**
     * 修改跟进记录
     * 
     * @param serviceRecord 跟进记录
     * @return 结果
     */
    @Override
    public int updateServiceRecord(ServiceRecord serviceRecord)
    {
        return serviceRecordMapper.updateServiceRecord(serviceRecord);
    }

    /**
     * 批量删除跟进记录
     * 
     * @param recordids 需要删除的跟进记录主键
     * @return 结果
     */
    @Override
    public int deleteServiceRecordByRecordids(Long[] recordids)
    {
        return serviceRecordMapper.deleteServiceRecordByRecordids(recordids);
    }

    /**
     * 删除跟进记录信息
     * 
     * @param recordid 跟进记录主键
     * @return 结果
     */
    @Override
    public int deleteServiceRecordByRecordid(Long recordid)
    {
        return serviceRecordMapper.deleteServiceRecordByRecordid(recordid);
    }

    @Override
    public List<RecordData> selectList(RecordData serviceRecord) {
        return serviceRecordMapper.selectList(serviceRecord);
    }
}
